package com.quanyan.club.mq.producer;

import com.quanyan.club.mq.constant.MqConstant;
import com.quanyan.mq.mq.producer.AbstractMqProducer;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author Hugo.Wwg
 * @Since 2016-07-15
 *
 * 用户中心任务消息
 */
@Component
public class ActivityOrderPayRelatedProducer extends AbstractMqProducer {

    @Value("${mq.nameServer.address}")
    private String nameServerAddress;

    @Override
    protected String getProducerGroup() {
        return MqConstant.CLUB_ACTIVITY_ORDER_CALLBACK_HANDLE_GROUP_NAME;
    }

    @Override
    protected String getNameServerAddress() {
        return this.nameServerAddress;
    }

    @Override
    protected String getInstanceName() {
        return MqConstant.CLUB_ACTIVITY_ORDER_CALLBACK_HANDLE_INSTANCE_NAME;
    }

    @PostConstruct
    void run() {
        super.start();
    }
}
